home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / tangerine-panic.swf / scripts / frame_36 / PlaceObject2_37_6 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-04  |  727 b   |  35 lines

  1. onClipEvent(enterFrame){
  2.    if(!dead && !almostdead && _root._xmouse > 50 && _root._xmouse < 540)
  3.    {
  4.       if(_root._xmouse < this._x)
  5.       {
  6.          dir = "left";
  7.       }
  8.       else if(_root._xmouse > this._x)
  9.       {
  10.          dir = "right";
  11.       }
  12.       else
  13.       {
  14.          dir = "none";
  15.       }
  16.       this._x = _root._xmouse;
  17.       if(dir != prevdir)
  18.       {
  19.          if(dir == "none")
  20.          {
  21.             _root.man.gotoAndPlay("1");
  22.          }
  23.          else if(dir == "left")
  24.          {
  25.             _root.man.gotoAndPlay("left");
  26.          }
  27.          else if(dir == "right")
  28.          {
  29.             _root.man.gotoAndPlay("right");
  30.          }
  31.          prevdir = dir;
  32.       }
  33.    }
  34. }
  35.